[#ftl]
[#--include "../../util.ftl"/--]
[@define "agile.form.NumberTextBoxMixin" "agile.form.ValidationTextBox"]		
	attributes:agile.delegate(agile.form.ValidationTextBox.prototype.attributes,{
		conversion:{_ignore:true,_hidden:true}
		,pattern:{_ignore:true,_hidden:true}
		,trim: {_ignore:true,_hidden:true}
		,value:	lang.mixin({},agile.NumberMetadata,{label:"i18n_value",integer:false})
		,"constraints.min":lang.mixin({},agile.NumberMetadata,{
				label:"i18n_min_value",integer:false
				,onValueChange:function(/*widget*/widget,/*String*/name,/*Object*/value){
					widget.delegate.constraints.min = value;
					widget.metadata(this.metadataCategory+"."+name,value);
					widget.delegate.reset1("value",widget.metadata("parameters.value"));
				}
			})
		,"constraints.max":lang.mixin({},agile.NumberMetadata,{
			label:"i18n_max_value",integer:false
			,onValueChange:function(/*widget*/widget,/*String*/name,/*Object*/value){
				widget.delegate.constraints.max = value;
				widget.metadata(this.metadataCategory+"."+name,value);
				widget.delegate.reset1("value",widget.metadata("parameters.value"));
			}
		})
//		,"constraints.pattern":lang.mixin({},agile.TextMetadata,{
//			label:"i18n_pattern"
//			,onValueChange:function(/*widget*/widget,/*String*/name,/*Object*/value){
//				widget.metadata(this.metadataCategory+"."+name,value);
//				widget.delegate.constraints.pattern = value;										
//				widget.delegate.reset1("value",widget.metadata("parameters.value"));
//			}
//		})	
		,"constraints.places":lang.mixin({},agile.NumberMetadata,{
			label:"i18n_precision"
			,onValueChange:function(/*widget*/widget,/*String*/name,/*Object*/value){
				widget.metadata(this.metadataCategory+"."+name,value);
				widget.delegate.constraints.places = value;										
				widget.delegate.reset1("value",widget.metadata("parameters.value"));
			}	
		})
	})	
//	,initDefaultMetadata: function(){	
//		this.metadata("parameters.value",123456);
//	}
[/@]
